<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="__TMPL__/style/common.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="__TMPL__/style/supply-style.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="__ROOT__/Public/Css/dtree.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/core.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/dtree.js"></script>
    <title>EHS</title>
  </head>
  <body>
    <layout name="Public:header" cache="0" />
    <div class="container">
      <div class="path-sub-nav"><span><a href="__URL__/publish/">免费发布供求信息</a></span>您所在位置：<a href="/index.html">首页</a> &gt; <a href="__URL__/index">供求</a> &gt; 供求信息</div>
      <div class="supply-list">
        <div class="supply-list-left">
          <div class="mode-supply-head">
            <h2>分类列表</h2>
            <div class="clear"></div>
          </div>
          <div class="" style="padding-left:20px; padding-top: 10px; " id="divLeft"></div>
        </div>
        <div class="supply-list-right">
          <div class="mode-supply-head">
            <h2>供求信息列表</h2>
            <div class="clear"></div>
          </div>
          <div class="supply-list-cont">
            <ul>
              <volist name="list" id="vo">
                <li><span>{$vo.pub_date}</span><span>{$vo.username}</span>
                  [{$types[$vo[type]][name]}<if condition="$vo.sub gt 0">/{$types[$vo[type]][sub][$vo[sub]][name]}</if>]<a href="__URL__/content/id/{$vo.id}" target="_blank">{$vo.title}</a>
                </li>
              </volist>
            </ul>
          </div>
          <div class="paging">{$page}</div>
        </div>
        <div class="clear"></div>
      </div>
    </div>
    <layout name="Public:footer" cache="0" />
    <script>
      var treeID = "{$tree_id}";//初始化树节点的样式
      var types = {$typesObj};
      var tree = new dTree('tree');
      /*  找不出为什么下面的训话构造的树，跟js写的有差别，用下面的循环，样式有错，暂时置空，迟点再搞TODO
      for (var i in types) {
        var t = types[i];
        tree.add(t.tree_id,t.tree_pid,t.name,t.url);
        for (var j in t.sub) {
          var s = t.sub[j];
          tree.add(s.tree_id,s.tree_pid,s.name,s.url);
        }
      } */
      //由于数量不多，暂时手工构造
      var url = '__URL__/lists';
      var treeObj = {
        0:{id:0, pid:-1, title:'全部',target:url},
        1:{id:1, pid:0, title:'会务',target:url+'/type/1'},
        //2:{id:2, pid:1, title:'会务',target:url+'/type/1/sub/1'},
        //3:{id:3, pid:1, title:'聚会',target:url+'/type/1/sub/2'},
        4:{id:4, pid:0, title:'培训',target:url+'/type/3'},
        5:{id:5, pid:0, title:'招聘求职',target:url+'/type/5'},
        6:{id:6, pid:5, title:'招聘',target:url+'/type/5/sub/1'},
        7:{id:7, pid:5, title:'求职',target:url+'/type/5/sub/2'},
        8:{id:8, pid:0, title:'EHS需求',target:url+'/type/7'},
        9:{id:9, pid:8, title:'产品',target:url+'/type/7/sub/1'},
        10:{id:10, pid:8, title:'EHS服务',target:url+'/type/7/sub/2'},
        11:{id:11, pid:8, title:'工程',target:url+'/type/7/sub/3'},
        12:{id:12, pid:8, title:'悬赏或招标',target:url+'/type/7/sub/4'}
      };
      for (var i in treeObj) {
        var t = treeObj[i];
        tree.add(t.id,t.pid,t.title,t.target);
      } 
      $("#divLeft").append(tree.toString());
    </script>
  </body>
</html>
